const ClassedRender = {
    classes: [
        {
            color: "#E57386",
            values: [80, 9999],
            label: "高风险",
        },
        {
            color: "#DE916A",
            values: [60, 80],
            label: "高中风险",
        },
        {
            color: "#D5C863",
            values: [40, 60],
            label: "中风险",
        },
        {
            color: "#69CC56",
            values: [20, 40],
            label: "低中风险",
        },
        {
            color: "#3CBD7D",
            values: [0, 20],
            label: "低风险",
        },
    ],
    nullColor: "#9E9E9E",
    getColor(value) {
        if (!value) return this.nullColor;
        const cls = this.classes.find(
            (c) => c.values[0] < value && value <= c.values[1]
        );
        return cls ? cls.color : this.nullColor;
    },
};
export default ClassedRender;
